<?php
include("database.class.php");

$db = new Database("../mysqlconfig.txt");
$link = $db->connectWithDb();

$users = $db->executeQuery($link, "SELECT * FROM users ORDER BY name ASC");

echo "<table>\n";
echo "<tr><th>Name</th> <th>Amount of double messages said.</th></tr>";
foreach($users as $user) {
	echo "<tr><td>".$user['name']."</td><td><a href='messages.php?id=".$user['id']."'>".$user['amount']." (which?)</a></td></tr>";
}
echo "</table>\n";

?>
